# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-logbook
_pkgname=Logbook
pkgver=1.5.3
pkgrel=2
pkgdesc='A logging replacement for Python.'
url='https://pypi.org/project/logbook/#files'
arch=('x86_64' 'aarch64')
license=('BSD')
depends=('python2' 'python2-six')
makedepends=('python2-setuptools' 'cython2')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('528fe4b324f4eb0e86b0463ab46500135e14049bf1ab6e0b71c808e9850a793525c6cc890eacf7ee16458dc7dcf817f1b1f8d7cf2dfc826a4bef70506dba3120')

build() {
  cd "$_pkgname-$pkgver"

  cython2 logbook/_speedups.pyx

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

